/**
 * Copyright 2013 Viettel Telecom. All rights reserved.
 * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.viettel.core.entities.cms;

import java.io.Serializable;
import java.sql.Clob;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.Index;

/**
 *  LOG UNG UNG
 *  @author: ToanTM1
 *  @version: 2.1
 *  @since: 03-10-2013 - 16:14:41
 */
@Entity
@Table(name = "MS_TRANSACTION_LOG")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@SequenceGenerator(name = "SEQ_STORE", sequenceName = "MS_TRANSACTION_LOG_SEQ", allocationSize = 1)
public class MsTransactionLog implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -5340895585660178194L;

	/**
	 * ID
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_STORE")
	@Column(name = "ID")
//	@Index(name="MS_TRANSACTION_LOG_ID_PK")
	private Integer id;

	@Basic
	@Column(name = "USER_ID")
	private Integer userId;

	@Basic
	@Column(name = "IMEI")
	private String IMEI;

	@Basic
	@Column(name = "VALUE", length = 1000)
	private String value;

	@Basic
	@Column(name = "PARAMS", length = 1000)
	private String params;

	/**
	 * MA LOI
	 */
	@Basic
	@Column(name = "ERROR_CODE")
	private Integer errorCode;

	@Basic
	@Column(name = "RESULT")
	private Clob result;
	
	/**
	 * TEN PHUONG THUC
	 */
	@Basic
	@Column(name = "METHOD", length = 255)
	private String method;

	/**
	 * THOI GIAN TAO
	 */
	@Basic
	@Column(name = "CREATED_TIME", columnDefinition = "timestamp(9) default systimestamp", insertable = false, updatable = false)
	@Temporal(TemporalType.TIMESTAMP)
	private Date createdTime;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getIMEI() {
		return IMEI;
	}

	public void setIMEI(String iMEI) {
		IMEI = iMEI;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getParams() {
		return params;
	}

	public void setParams(String params) {
		this.params = params;
	}

	public Integer getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(Integer errorCode) {
		this.errorCode = errorCode;
	}

	public Clob getResult() {
		return result;
	}

	public void setResult(Clob result) {
		this.result = result;
	}

	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method;
	}

	public Date getCreatedTime() {
		return createdTime;
	}

	public void setCreatedTime(Date createdTime) {
		this.createdTime = createdTime;
	}

	

}
